package com.blue.integration.serve.netpopo;

import com.blue.core.util.DateUtil;
import com.blue.integration.serve.VehicleLicense;

/**
 * @author zhengjin
 * @since 1.0 2018年07月05日
 */
public class NetpopoVehicleLicense
{
	private String lsprefix;
	private String lsnum;
	private String lstype;
	private String lstypename;
	private String realname;
	private String address;
	private String cartype;
	private String frameno;
	private String engineno;
	private String regdate;
	private String issuedate;
	private String usetype;

	public NetpopoVehicleLicense()
	{
	}

	public VehicleLicense toVehicleLicense()
	{
		VehicleLicense license = new VehicleLicense();
		license.setOwner(realname);
		license.setPlateNum(lsprefix + lsnum);
		license.setVehicleType(lstypename);
		license.setModel(cartype);
		license.setVin(frameno);
		license.setEngineNum(engineno);

		if (regdate != null && !regdate.isEmpty())
			license.setRegisterDate(DateUtil.parseDate(regdate));

		if (issuedate != null && !issuedate.isEmpty())
			license.setIssueDate(DateUtil.parseDate(issuedate));

		return license;
	}

	public String getLsprefix()
	{
		return lsprefix;
	}

	public void setLsprefix(String lsprefix)
	{
		this.lsprefix = lsprefix;
	}

	public String getLsnum()
	{
		return lsnum;
	}

	public void setLsnum(String lsnum)
	{
		this.lsnum = lsnum;
	}

	public String getLstype()
	{
		return lstype;
	}

	public void setLstype(String lstype)
	{
		this.lstype = lstype;
	}

	public String getLstypename()
	{
		return lstypename;
	}

	public void setLstypename(String lstypename)
	{
		this.lstypename = lstypename;
	}

	public String getRealname()
	{
		return realname;
	}

	public void setRealname(String realname)
	{
		this.realname = realname;
	}

	public String getAddress()
	{
		return address;
	}

	public void setAddress(String address)
	{
		this.address = address;
	}

	public String getCartype()
	{
		return cartype;
	}

	public void setCartype(String cartype)
	{
		this.cartype = cartype;
	}

	public String getFrameno()
	{
		return frameno;
	}

	public void setFrameno(String frameno)
	{
		this.frameno = frameno;
	}

	public String getEngineno()
	{
		return engineno;
	}

	public void setEngineno(String engineno)
	{
		this.engineno = engineno;
	}

	public String getRegdate()
	{
		return regdate;
	}

	public void setRegdate(String regdate)
	{
		this.regdate = regdate;
	}

	public String getIssuedate()
	{
		return issuedate;
	}

	public void setIssuedate(String issuedate)
	{
		this.issuedate = issuedate;
	}

	public String getUsetype()
	{
		return usetype;
	}

	public void setUsetype(String usetype)
	{
		this.usetype = usetype;
	}
}
